package com.xwj.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * 库存操作事务日志
 *
 * @author xwj
 * @date 2020/11/20
 */
public class StorageTxLog implements Serializable {
    private static final long serialVersionUID = -8068578282011256493L;
    private Integer id;
    /**
     * 全局事务id
     */
    private String xid;
    /**
     * 分支事务id
     */
    private Long branchId;
    /**
     * 事务状态：try、confirm、rollback
     */
    private Integer status;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 更新时间
     */
    private Date updateTime;

    public StorageTxLog() {
    }

    public StorageTxLog(String xid, Long branchId, Integer status, Date createTime, Date updateTime) {
        this.xid = xid;
        this.branchId = branchId;
        this.status = status;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getXid() {
        return xid;
    }

    public void setXid(String xid) {
        this.xid = xid;
    }

    public Long getBranchId() {
        return branchId;
    }

    public void setBranchId(Long branchId) {
        this.branchId = branchId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("OrderTxLog{");
        sb.append("id=").append(id);
        sb.append(", xid='").append(xid).append('\'');
        sb.append(", branchId=").append(branchId);
        sb.append(", status=").append(status);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append('}');
        return sb.toString();
    }
}
